package com.shop.shop.controller;


import com.baomidou.mybatisplus.extension.api.R;
import com.shop.shop.entity.Sort;
import com.shop.shop.service.SortService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 
商品分类表 前端控制器
 * </p>
 *
 * @author 小🌤
 * @since 2021-04-22
 */
@RestController
@RequestMapping("/shop/sort")
public class SortController {

    @Autowired
    private SortService sortService;

    /**
     *  查询全部的分类
     * @return
     */
    @GetMapping("list")
    public R list(){
        List<Sort> list = sortService.list();
        return R.ok(list);
    }

}

